<?php
include(dirname(__FILE__).'/top-bottom-share-data.php');

$GLOBALS['GV_IMAGE_PATH'] = '/article';
$dt = new DataTable(constant('DB_TABLE_ARTICLE'));
$GLOBALS['GV_IMAGE_PATH'] = 'article/';
$act = isset($_REQUEST['act'])?$_REQUEST['act']:'';
$condition = "`is_delete`='N' AND `cat_id`=2 AND `sub_cat_id`=5";
$GLOBALS['PAGE_SUB_CAT_NAME'] = '';
$page = isset($_REQUEST['page']) && intval($_REQUEST['page']) > 0?intval($_REQUEST['page']):1;
$page_size = isset($_REQUEST['page_size'])?intval($_REQUEST['page_size']):5;
$offset = $page_size * ( $page - 1);
$GLOBALS['PAGE_LIST_DATA'] = $dt->get_list($condition, array('-date','-id'), $page_size, $offset);
$total_row =  $dt->get_count($condition);
$GLOBALS['PAGE_LIST_TOTAL_PAGE'] = ceil($total_row/$page_size);
$GLOBALS['PAGE_LIST_PAGE'] = $page;
$_REQUEST['page'] = $page;
?>